package com.vhly.tuite;

import android.app.ListActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: vhly
 * Date: 2010-7-20
 * Time: 16:39:17
 *
 * @author vhly[FR]
 */
public class SettingActivity extends ListActivity implements AdapterView.OnItemSelectedListener {

    private List<String> settingNames;
    private ArrayAdapter<String> adapter;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        settingNames = new ArrayList<String>();
        String twacc = this.getResources().getString(R.string.twaccount);
        settingNames.add(twacc);
        adapter = new ArrayAdapter<String>(this, R.layout.setting, R.id.settingname, settingNames);
        setListAdapter(adapter);
        this.getListView().setOnItemSelectedListener(this);
    }

    public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
        Log.d("SettingActivity", "view = " + view + " pos = " + pos + " id = " + id);
    }

    public void onNothingSelected(AdapterView<?> parent) {
        Log.d("SettingActivity", "");
    }
}
